package com.hexacta.hrs.test.data;

import java.util.List;
import java.util.Map;

import org.vectrics.skill.SkillScoringMethod;

/**
 * Test data dependency creator for the SkillScoringMethod class.
 * 
 * @author tpollak
 */
public class SkillScoringMethodTestDataDependencyCreator extends AbstractTestDataDependencyCreator {

    public SkillScoringMethodTestDataDependencyCreator(List<TestDataDependencyCreator> dependencies) {
        super(dependencies);
    }

    public void createDependentTestData(Map<String, Object> context) {
        // Create the Skill Scoring Mehtods
        this.createAndInsertSkillScoringMethod("level", "Level Answer");
        this.createAndInsertSkillScoringMethod("none", "None");
        this.createAndInsertSkillScoringMethod("years", "Years Answer");
        this.createAndInsertSkillScoringMethod("yes-no", "Yes/No Answer");
    }

    private void createAndInsertSkillScoringMethod(String code, String description) {
        SkillScoringMethod method = this.createSkillScoringMethod(code, description);
        this.insertCodedObject(method);
    }

    private SkillScoringMethod createSkillScoringMethod(String code, String description) {
        SkillScoringMethod method = new SkillScoringMethod();
        method.setCode(code);
        method.setDescription(description);
        method.setVoided(false);
        return method;
    }

}
